<#assign s=JspTaglibs["/WEB-INF/struts-tags.tld"]>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>首页</title>
		<#include "/WEB-INF/ftl/user/include.ftl" />
		<link type="text/css" rel="stylesheet" href="${base}/css/user/side.css" />
		<link type="text/css" rel="stylesheet" href="${base}/css/user/index.css" />
		<script type="text/javascript" src="${base}/js/user/index.js"></script>
	</head>
	<body>
		<#include "/WEB-INF/ftl/user/header.ftl" />
		<#assign types = ["主板", "CPU", "内存", "硬盘", "显卡", "机箱", "电源", "散热器", "光驱", "显示器", "音箱", "声卡", "网卡"] />
		<#assign links = ["mainBoard", "cpu", "memory", "disk", "graphics", "chassis", "power", 
							"radiator", "driver", "monitor", "soundBox", "soundCard", "nic"] />
		<div class="wrapper clearfix">
			<#include "/WEB-INF/ftl/user/side.ftl" />
			<div class="main">
				<div class="brand-box">
					<div class="brand-box-hd">
						<h2>品牌查找</h2>
					</div>
					<ul class="brand-box-bd">
						<#list Session.brandLists as brands>
						<li class="brand">
							<span class="icon-${brands_index+1}"></span>
							<h3><a href="${base}/${links[brands_index]}Search.do">${types[brands_index]}</a></h3>
							<p>
								<#list brands[0..brands?size-2] as brand>
								<a href="${base}/${links[brands_index]}Search.do?selectedConditions[brand]=${brand.id?c}">${brand.brand}</a>|
								</#list>
								<a href="${base}/${links[brands_index]}Search.do?selectedConditions[brand]=${(brands?last).id?c}">${(brands?last).brand}</a>
							</p>
						</li>
						</#list>
					</ul>
				</div>
			</div>
		</div>
		<div class="wrapper">
			<#list Session.newLists as newList>
			<div class="component">
				<div class="component-hd">
					<h2>${types[newList_index]}</h2>
				</div>
				<div class="component-bd clearfix">
					<div class="new">
						<h3 class="new-hd">新品上线</h3>
                        <ul class="new-bd">
							<#list newList as newProduct>
                            <li>
                            	<#assign id = newProduct.id?c />
                            	<#assign model = newProduct.model />
                            	<#assign price = newProduct.oPrice />
								<span class="model">
									<a target="_blank" href="${base}/${links[newList_index]}Overview.do?id=${id}" title="${model}">${model}</a>
								</span>
								<span class="price">&yen;<b>${price}</b></span>
							</li>
							</#list>
						</ul>
					</div>
					<div class="hot">
						<h3 class="hot-hd">热门产品</h3>
						<ul class="hot-bd">
							<#list Session.hotLists[newList_index] as hotProduct>
							<li>
                            	<#assign id = hotProduct.id?c />
                            	<#assign model = hotProduct.model />
                            	<#assign price = hotProduct.oPrice />
								<a target="_blank" href="${base}/${links[newList_index]}Overview.do?id=${id}" class="img" title="${model}">
									<img width="120" height="90" src="${base}/pic/default.jpg" alt="${model}" />
								</a>
								<a target="_blank" href="${base}/${links[newList_index]}Overview.do?id=${id}" class="model" title="${model}">${model}</a>
								<p class="price">&yen;<b>${price}</b></p>
							</li>
							</#list>
							<li class="justify-fix">&nbsp;</li>
						</ul>
					</div>
				</div>
			</div>
			</#list>
		</div>
		<#include "/WEB-INF/ftl/user/footer.ftl" />
	</body>
</html>

